<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <title>测试</title>
  </head>
  <body>
    <script>
      function foo(x) {
        y = 3;
        console.log(x, y);
      }

      foo(4);
      console.log(y);
    </script>
  </body>
</html>
